package h0720;

import java.util.Arrays;
import java.util.Scanner;
/**
  * @description 有序整数序列求绝对值最小
  * @author 不知名帅哥
  * @date 2024/7/20 9:23
  * @version 1.0
*/
public class MinAbsOfTwoNumber {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int[] array = Arrays.stream(sc.nextLine().split(" ")).mapToInt(Integer::parseInt).toArray();
        int res=getResult(array);
        System.out.println(res);
    }

    private static int getResult(int[] array) {
        int min=Math.abs(array[0]+array[array.length-1]);
        for (int i = 0; i < array.length; i++) {
            for (int j = i+1; j < array.length; j++) {
                int abs = Math.abs(array[i] + array[j]);
                min = Math.min(abs, min);
            }
        }
        return min;
    }
}
